package cn.dt70.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
    
    public static String format(Date date){
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        return format.format(date);
    }
    
    public static Date parse(String dateStr) throws Exception{
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        return  format.parse(dateStr);
    }
}
